/**
 * 获取答卷信息
 */

const getStateList = require('./getStatList')

module.exports = [
  {
    url: '/api/stat/:questionId',
    method: 'get',
    response() {
      return {
        errno: 0,
        data: {
          total: 100, // 分页
          list: getStateList()
        }
      }
    }
  },
  // 获取问卷的统计信息
  {
    url: '/api/stat/:questionId/:componentId',
    method: 'get',
    response() {
      return {
        errno: 0,
        data: {
          stat: [
            { name: '选项1', count: 20 },
            { name: '选项2', count: 10 },
            { name: '选项3', count: 30 }
          ]
        }
      }
    }
  }
]
